package datas.main;

import org.andengine.engine.camera.Camera;
import org.andengine.engine.options.EngineOptions;
import org.andengine.engine.options.ScreenOrientation;
import org.andengine.engine.options.resolutionpolicy.FillResolutionPolicy;
import org.andengine.entity.scene.Scene;
import org.andengine.entity.scene.background.Background;
import org.andengine.opengl.texture.atlas.bitmap.BitmapTextureAtlas;
import org.andengine.opengl.texture.atlas.bitmap.BitmapTextureAtlasTextureRegionFactory;
import org.andengine.ui.activity.SimpleBaseGameActivity;
import org.andengine.util.color.Color;

import datas.gameflow.MainScreen;

public class GameCenterController {
	
	public static EngineOptions initGameEngineOptions(SimpleBaseGameActivity act){
		GameCenterBase.getInstance().engine = act;
		GameCenterBase.getInstance().CAMERA_WIDTH = act.getWindowManager().getDefaultDisplay().getWidth();
		GameCenterBase.getInstance().CAMERA_HEIGHT = act.getWindowManager().getDefaultDisplay().getHeight();
		
		float cameraWidth = GameCenterBase.getInstance().CAMERA_WIDTH;
		float cameraHeight = GameCenterBase.getInstance().CAMERA_HEIGHT;
		GameCenterBase.getInstance().camera = new Camera(0, 0, cameraWidth, cameraHeight);
		EngineOptions engineoptions = new EngineOptions(true, ScreenOrientation.LANDSCAPE_FIXED, 
				new FillResolutionPolicy(), GameCenterBase.getInstance().camera);
		
		return engineoptions;
	}

	public static void initilizeGame(){
		GameCenterBase.getInstance().mainScreen = new MainScreen();
		loadResources();
	}
	
	private static void loadResources() {
		
	}
	
	
	public static Scene getFirstScreen() {
		MainScreen screen = new MainScreen();
		return screen;
	}
	
	/* Load image
		BitmapTextureAtlasTextureRegionFactory.setAssetBasePath("gfx/");
		bitmapAtlas = new BitmapTextureAtlas(getTextureManager(), 256 , 256);
		txtRegion = BitmapTextureAtlasTextureRegionFactory.createFromAsset(bitmapAtlas, 
				this, "splash.png", 0, 0);
		bitmapAtlas.load();	
	
	
	 */
}
